<script type="text/javascript">
	function GoToIndex() {
		var url = "<?php echo $this->createURL("", array("id"=>"xreplacex"))?>";
		var divisi = document.getElementById("divisi").selectedIndex;
		url = url.replace("xreplacex",divisi);
	
		//Go
		if (divisi!=0)  window.location = url;
	}
	
	function CreateNewOperasi() 
	{
		var url = "<?php echo $this->createURL("create", array("id"=>"xreplacex"))?>";
		var divisi = document.getElementById("divisi").selectedIndex;
		url = url.replace("xreplacex",divisi);
	
		//Go
		if (divisi!=0) window.location = url;
	}
</script>

<?php
$this->breadcrumbs=array(
	'SIPMA'=>array($this->createUrl('/../sipma')),
	'Monitoring'=>array($this->createUrl('/../sipma/monitoring/default/index')),
	'Operasi',
);
?>
<h1>Monitoring Operasi</h1>

<p>
	Division : 
	<?php 
		echo CHtml::dropDownList('divisi', $id, $division);
		echo CHtml::submitButton('Go', array('onClick'=>'GoToIndex()'));
	?>
</p>

<h2> <?php echo $this->getDivisionName($id)?> </h2>

<?php echo CHtml::submitButton('Create New Transaksi Operasi', array('onClick'=>'CreateNewOperasi()'))?>

<?php 
$this->widget('zii.widgets.jui.CJuiTabs', array(
		'tabs' => array(
			'Transaksi Operasi Pending' 	=> $this->renderPartial('table/OperasiPending', array('id'=>$id, 'model'=>$model), true),
			'Transaksi Operasi Approved' 	=> $this->renderPartial('table/OperasiApproved', array('id'=>$id, 'model'=>$model), true),
			'Transaksi Operasi Rejected' 	=> $this->renderPartial('table/OperasiRejected', array('id'=>$id, 'model'=>$model), true),
		),
		'options' => array(
			'collapsible' => true,
		),
	));
?>